package game.logic.block;


public class BlockFactory {

	static public Block getSquare(String shape) {
		Block square;
		try {
			square = (Block) Class.forName("game.logic.block.Block" + shape).newInstance();
		} catch (Exception e) {
			square = new BlockRect();
		}
		return square;
	}
	
	static String [] shape = {"Rect","I","L","T","Z","ODZ","ODL"};
	 
	static public Block getSquare() {
		int i = (int) (7 * Math.random());
		System.out.println("i="+i);
		return getSquare(shape[i]);
	}
	
}
